Skip to main content

All Questions

Tagged with
6votes
1answer
136views

Dynamic image gallery with filters pulling from a JSON file

I have an image gallery of old internet banner ads that pulls URLs and metadata from a JSON file and then displays them based on a set of user-selectable filters. The filters can show/exclude images ...
fish's user avatar
  • 160
3votes
1answer
268views

Find the closest named color

I have a .json file with name (string) and RGB (r, g, b: numbers) with 30.000 key-value pairs. I am looping the json multiple times per second to find the closest name to a given RGB color. Any idea ...
Relik8's user avatar
3votes
1answer
291views

JSON comparison function

I've written a comparison function between two json values. I'd like to know if it can be improved at all in any way. Thanks again for the help. ...
David542's user avatar
0votes
1answer
132views

Using JavaScript to interface with REST APIs

The website TryHackMe came up with a challenge that involves using HTTP requests to interface with REST APIs (here, task #14/day 9). The challenge basically involves querying a basic REST API to ...
Aleksey's user avatar
3votes
1answer
1kviews

Insert json object into existing Json array

I have created a tool to insert JSON objects with several rules: Read the product status, and then insert based on the status If there is no data in this status, then insert the object If there is ...
ilham ramadhan's user avatar
4votes
1answer
319views

Recipe website with API and JSON using vanilla JS

I'm training JavaScript and using APIs. So I'm building a recipe website that lets you search ingredients and finds you recipes with it. Here is the link: https://www.themealdb.com/ I found some code ...
emma673r's user avatar
1vote
1answer
237views

Updating large and heavily nested JSON properties based on existing properties using nested forEach loops

The structure of the JSON is as such: Each parent record can have many DataGroups and each DataGroup can have many ...
Faahmed's user avatar
2votes
1answer
190views

Javascript function which polls an async endpoint and inserts the result in a web page

I read about debounce this morning and ended up needing something similar to the concept in real life this evening to build a poll that checks whether a link I receive from an async call is ready to ...
Dozie's user avatar
3votes
0answers
206views

Fetch JSON from several URLs

The exercise is Write a JavaScript package that is able to: fetch an array of URLs which contain JSON data return their contents in a promise I have already made a solution to this exercise, but I ...
Zubair97's user avatar
4votes
2answers
3kviews

Download entire localStorage as file

I would like to download the entire contents from localStorage to a json file (in a "clear" formatting). I've tried this and it works perfectly. However, ...
Gibberish's user avatar
0votes
2answers
98views

JSONtab library : A tool to reversibly convert between an arbitrarily deep nested object and a tabular format

Could the following code be improved in terms of clarity, performance, maintainability, best practices etc? JSONtab library A tool to reversibly convert between an arbitrarily deep nested object and a ...
user2309803's user avatar
1vote
2answers
420views

group countries by language in JavaScript

I need a better implementation than the below code (O(N) Solution), I am grouping countries by language ( data ) is the countries JSON, each country could have 0, 1 .. or more language as the object ...
Odeh Abuzaid's user avatar
4votes
0answers
57views

Fetching data from endpoint, retrieving coordinates, then merging into an output

I'm in no way a skilled developer (or even a developer at that!) but I did want to take a go at writing a script that fetched one endpoint's data, extracted some data, sent if off to be geocoded, then ...
markb's user avatar
2votes
2answers
1kviews

Using JavaScript, given a JSON value, recursively find all JSON objects, then sort keys in-place

Some background: JavaScript is not my primary language, so I'm looking to get some constructive criticism here. I built a tiny single page HTML app that pretty prints JSON text. It's very useful when ...
kevinarpe's user avatar
1vote
1answer
297views

A simple wrapper around fetch

I am writing a simple wrapper around fetch. ...
Joji's user avatar
  • 325

153050per page
close